package shopping.model;

import java.io.Serializable;
import javax.persistence.*;


/**
 * The persistent class for the shoppingcart database table.
 * 
 */
@Entity
@NamedQueries({
	@NamedQuery(name="FindByAcc",query="select sc from Shoppingcart sc where sc.accountID = :accountID and sc.productID = :productID"), 
	@NamedQuery(name="GetByUsername",query="select sc from Shoppingcart sc where sc.accountID = :accountID"),
	@NamedQuery(name="DeleteProduct",query="Delete from Shoppingcart sc where sc.accountID = :accountID and sc.productID = :productID")})
public class Shoppingcart implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private int shoppingCardID;

	private String accountID;

	private int productID;

	private int quantity;

	public Shoppingcart() {
	}

	public int getShoppingCardID() {
		return this.shoppingCardID;
	}

	public void setShoppingCardID(int shoppingCardID) {
		this.shoppingCardID = shoppingCardID;
	}

	public String getAccountID() {
		return this.accountID;
	}

	public void setAccountID(String accountID) {
		this.accountID = accountID;
	}

	public int getProductID() {
		return this.productID;
	}

	public void setProductID(int productID) {
		this.productID = productID;
	}

	public int getQuantity() {
		return this.quantity;
	}

	public void setQuantity(int quantity) {
		this.quantity = quantity;
	}

}